package com.hippo.core.core.network

import com.hippo.core.core.network.interceptor.HeaderInterceptor
import com.hippo.core.core.network.interceptor.LoggerInterceptor
import com.hippo.core.config.AppConfig
import okhttp3.OkHttpClient
import retrofit2.Retrofit
import retrofit2.converter.gson.GsonConverterFactory

object HttpModule {


    val okHttpClient = OkHttpClient.Builder()
        .addInterceptor(HeaderInterceptor())
        .addInterceptor(LoggerInterceptor())
        .build()


    val retrofit = Retrofit.Builder()
        .baseUrl(AppConfig.API_SERVER_URL)
        .client(okHttpClient)
        .addConverterFactory(
            GsonConverterFactory.create()
        )
        .build()


}